In order to improve the effectiveness of vein feature extraction, a dorsal hand vein recognition method based on sparse coding was proposed. Firstly, during image acquisition process, acquisition system parameters were adaptively adjusted in real-time according to image quality assessment results, and the vein image with high quality could be acquired. Then concerning that the effectiveness of subjective vein feature mainly depends on experience, a feature learning mechanism based on sparse coding was proposed, thus high-quality objective vein features could be extracted. Experiments show that vein features obtained by the proposed method have good inter-class separableness and intra-class compactness, and the system using this algorithm has a high recognition rate.